<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="http://localhost/e-shop/xiangqu/Application/Index/View/Index/css/index.css"/>
		<script src="http://localhost/e-shop/xiangqu/Static/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://localhost/e-shop/xiangqu/Application/Index/View/Index/js/index.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!--头部begin-->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--头部固定区-->
<style type="text/css">
	#header .header_content .logined a{
		font: 400 14px/50px "微软雅黑";
	}
</style>
		<div id="header_fixed"></div>
		<div id="header">
			<div class="header_content">
				<div class="logo"><img src="http://localhost/e-shop/xiangqu/Application/Index/View/Index/images/logo.png" alt="" /></div>
				<?php if(!isset($_SESSION['username'])): ?>
				<div class="login">
					<!--<a href=""><span></span></a>-->
					<a href="<?php echo U(('Index/Register/index'));?>">注册</a>
					<a href="<?php echo U(('Index/Login/index'));?>">登录</a>
				</div>
				<?php else:  ?>
				<!--已登录begin-->
				<div class="logined">
					<a href="<?php echo U('out');?>">退出</a>
					<a href="<?php echo U('Index/Orders/myOrder');?>">我的订单</a>
					<a href="<?php echo U('Index/Carts/index');?>">购物车</a>
					<a href="<?php echo U('Index/User/index');?>"><?php echo $_SESSION['nick'] ?></a>
					<a href="<?php echo U('Index/Orders/myOrder');?>" class="face"><img src="http://localhost/e-shop/xiangqu/<?php echo $face;?>" alt="" /></a>
				</div>
				<!--已登录end-->
				<?php endif  ?>
			</div>
		</div>
		<!--头部end-->
		<!--菜单栏begin-->
		<div id="nav">
			<div class="nav_content">
				<a href="<?php echo U('Index/Index/index');?>">首页</a>
				<?php foreach ($navData as $k=>$v){?>
				<a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a>
				<?php }?>
				<div class="search">
					<form action="<?php echo U('Index/Search/index');?>" method="get">
						<input type="text" class="text" name="keys" placeholder="搜索" />
						<input type="submit" class="sbt" value=""/>
					</form>
				</div>
			</div>
		</div>
		<!--菜单栏end-->
		
		<!--产品焦点区begin-->
		<div id="focus">
			<div class="focus_content">
				<div class="left">
					<div class="img">
						        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($roll)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($roll as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=5)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($roll)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
						<a href="<?php echo $v['path'];?>" class="a_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['picture'];?>" alt="" /></a>
						<?php }}?>
						        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($roll)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($roll as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=1)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($roll)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
						<a href="<?php echo $v['path'];?>" class="a_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['picture'];?>" alt="" /></a>
						<?php }}?>
					</div>
					<div class="arrows_left"><span><</span></div>
					<div class="arrows_right"><span>></span></div>
				</div>
				<?php if(!isset($_SESSION['username'])):  ?>
				<div class="right">
					<img src="http://localhost/e-shop/xiangqu/Application/Index/View/Index/images/kafei.png" alt="" />
					<p>随时随地狂想去</p>
				</div>
				<?php else:  ?>
				<!--登录用户信息-->
				<div class="right right2">
					<a href="" class="r_face"><img src="http://localhost/e-shop/xiangqu/<?php echo $face;?>" alt="" /></a>
					<span class='r_h'>Hi</span>
					<a href="<?php echo U('Index/Orders/myOrder');?>" class="r_name"><span><?php echo $hd['session']['nick'];?></span></a>
					<a href="<?php echo U('Index/Orders/myOrder',array('os'=>2));?>" class="r_s">待收货&nbsp;&nbsp;&nbsp;&nbsp;<span><?php echo $orders2;?></span></a>
					<a href="<?php echo U('Index/Orders/myOrder',array('os'=>0));?>" class="r_f">待付款&nbsp;&nbsp;&nbsp;&nbsp;<span><?php echo $orders0;?></span></a>
					<a href="<?php echo U('Index/User/index');?>" class="r_z">个人设置</a>
					<a href="<?php echo U(('out'));?>" class="r_t">退出</a>
					<div class="logo"><img src="http://localhost/e-shop/xiangqu/Application/Index/View/Index/images/logo.png"/></div>
				</div>
				<!--登录用户信息-->
				<?php endif  ?>
			</div>
		</div>
		<!--产品轮焦点区end-->
		<!--分类区begin-->
		<div id="channel">
			<div class="channel_cont">
				<div class="channel_top">
					<div class="c_left">
						<p class="p1">今天,<br/>想去诞生了</p>
						<p class="p2"><?php echo $count;?><span>个</span></p>
						<p class="p3">精选商品</p>
					</div>
					<div class="c_right">
						<p class="des">这里熙熙攘攘，你，又会遇见谁创造的美好</p>
						<ul>
							<?php foreach ($cateData as $k=>$v){?>
							<li><a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><span class="cont"><?php echo $v['cname'];?></span></a>    <?php if($k!=6){ ?><span class="slant"></span><?php } ?></li>
							<?php }?>
						</u>
					</div>
				</div>
				<div class="channel_time">
					<div class="c_time"><?php echo date('Y-m-d');?></div>
					<!--<div class="c_run">
						<ul>
							<li>935人在逛</li>
							<li>935人在逛</li>
						</ul>
					</div>-->
				</div>
			</div>
		</div>
		<!--分类器end-->
		<!--页面主体begin-->
		<div id="main">
			<!--想去限时购begin-->
			<div class="limit">
				<div class="l_bar">想去限时购</div>
				<div class="l_cont">
					<?php foreach ($hotData as $k=>$v){?>
					<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>"     <?php if($k==1){ ?>style="margin-right:0px"<?php } ?>><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /></a>
					<?php }?>
				</div>
			</div>
			<!--想去限时购end-->
			<!--女人广场begin-->
			<div class="product">
				<div class="p_bar">
					<h2>女人广场</h2><span class="s1"></span></span><span class="s2">今日精选</span><span class="s3"></span>
				</div>
				<div class="p_cont">
					<?php foreach ($womenData as $k=>$v){?>
					<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="a_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
					<?php }?>
				</div>
				<!--产品分类begin-->
				<div class="p_class">
					<?php foreach ($wenmanCate as $k=>$v){?>
					<dl>
						<dt><a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a></dt>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=3)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 0);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=4;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<4) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=3)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 4);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
					</dl>
					<?php }?>
					<!--<dl>
						<dt><a href="">女鞋</a></dt>
						<dd>
							<a href="">背包</a>
							<a href="">挎包</a>
						</dd>
						<dd>
							<a href="">抓包</a>
							<a href="">拎包</a>
						</dd>
					</dl>-->
					<div class="all">
						<a href="<?php echo U('Index/List/allCate');?>">全部</a>
					</div>
				</div>
				<!--产品分类end-->
				<div class="line"></div>
			</div>
			<!--女人广场end-->
			<!--男人广场begin-->
			<div class="productman product">
				<div class="p_bar">
					<h2>男人广场</h2><span class="s1"></span></span><span class="s2">今日精选</span><span class="s3"></span>
				</div>
				<div class="p_cont">
					        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($manData)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($manData as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($manData)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
					<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="a_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
					<?php }}?>
					<div class="d_img">
						        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($manData)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=2;
            foreach ($manData as $v) {
                //开始值
                if ($listId<2) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 2);
                //最后一个值
                $hd['list'][v]['last']= (count($manData)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
						<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="m_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
						<?php }}?>
					</div>
				</div>
				<!--产品分类begin-->
				<div class="p_class">
					<?php foreach ($manCate as $k=>$v){?>
					<dl>
						<dt><a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a></dt>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=3)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 0);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=4;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<4) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=3)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 4);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
					</dl>
					<?php }?>
					<div class="all">
						<a href="<?php echo U('Index/List/allCate');?>">全部</a>
					</div>
				</div>
				<!--产品分类end-->
				<div class="line"></div>
			</div>
			<!--男人广场end-->
			<!--生活家广场begin-->
			<div class="productlive product">
				<div class="p_bar">
					<h2>生活家广场</h2><span class="s1"></span></span><span class="s2">今日精选</span><span class="s3"></span>
				</div>
				<div class="p_cont">
					<?php foreach ($lifeData as $k=>$v){?>
					<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="a_img l_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
					<?php }?>
				</div>
				<!--产品分类begin-->
				<div class="p_class">
					<?php foreach ($lifeCate as $k=>$v){?>
					<dl>
						<dt><a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a></dt>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 0);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=3;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<3) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 3);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
					</dl>
					<?php }?>
					<div class="all">
						<a href="<?php echo U('Index/List/allCate');?>">全部</a>
					</div>
				</div>
				<!--产品分类end-->
				<div class="line"></div>
			</div>
			<!--生活家广场end-->
			<!--手工作坊begin-->
			<div class="productlive product">
				<div class="p_bar">
					<h2>手工作坊</h2><span class="s1"></span></span><span class="s2">今日精选</span><span class="s3"></span>
				</div>
				<div class="p_cont">
					<?php foreach ($handData as $k=>$v){?>
					<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="a_img l_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
					<?php }?>
				</div>
				<!--产品分类begin-->
				<div class="p_class">
					<?php foreach ($handCate as $k=>$v){?>
					<dl>
						<dt><a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a></dt>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 0);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=3;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<3) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 3);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
					</dl>
					<?php }?>
					<div class="all">
						<a href="<?php echo U('Index/List/allCate');?>">全部</a>
					</div>
				</div>
				<!--产品分类end-->
				<div class="line"></div>
			</div>
			<!--手工作坊end-->
			<!--vintage小铺begin-->
			<div class="productman product">
				<div class="p_bar">
					<h2>vintage小铺</h2><span class="s1"></span></span><span class="s2">今日精选</span><span class="s3"></span>
				</div>
				<div class="p_cont">
					        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($vinData)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($vinData as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($vinData)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
					<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="a_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
					<?php }}?>
					<div class="d_img">
						        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($vinData)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=2;
            foreach ($vinData as $v) {
                //开始值
                if ($listId<2) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 2);
                //最后一个值
                $hd['list'][v]['last']= (count($vinData)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
						<a href="<?php echo U('Index/Product/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>" class="m_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['bigpic'];?>" alt="" /><span><?php echo $v['cname'];?></span></a>
						<?php }}?>
					</div>
				</div>
				<!--产品分类begin-->
				<div class="p_class">
					<?php foreach ($vinCate as $k=>$v){?>
					<dl>
						<dt><a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a></dt>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 0);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
						<dd>
							        <?php
        //初始化
        $hd['list']['n'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=2;
            foreach ($v['son'] as $n) {
                //开始值
                if ($listId<2) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][n]['index']++;
                //第1个值
                $hd['list'][n]['first']=($listId == 2);
                //最后一个值
                $hd['list'][n]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][n]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
							<a href="<?php echo U('Index/List/index',array('cid'=>$n[cid]));?>"><?php echo $n['cname'];?></a>
							<?php }}?>
						</dd>
					</dl>
					<?php }?>
					<div class="all">
						<a href="<?php echo U('Index/List/allCate');?>">全部</a>
					</div>
				</div>
				<!--产品分类end-->
				<div class="line"></div>
			</div>
			<!--vintage广场end-->
		</div>
		<!--页面主体end-->
		<!--页面底部begin-->
		<div id="footer">
			<div class="foot_wrap">
				<div class="say">
					<p class="p1">“如果你的东西和大家都一样，那干嘛还设计它？”</p>
					<p class="p2">by  Philippe Starck</p>
				</div>
				<div class="foot_logo"></div>
				<p class='infor'>Copyright 2015 版权所有 浙ICP备12027496 <a href="">热门精选</a> <a href="">热门分类</a></p>
				<p class='link'>商务合作  友情链接： 想去网  蘑菇街 360安全网址 爱图购</p>
			</div>
		</div>
		<!--页面底部end-->
	</body>
</html>
